Update Microsoft.Windows/FirewallRuleList to support unspecifiedRulesAction property#1599
Open
SteveL-MSFT wants to merge 2 commits into
Open
Update Microsoft.Windows/FirewallRuleList to support unspecifiedRulesAction property#1599SteveL-MSFT wants to merge 2 commits into
unspecifiedRulesAction property#1599SteveL-MSFT wants to merge 2 commits into
Conversation
…sAction` property
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Microsoft.Windows/FirewallRuleList DSC resource to support an authoritative-mode behavior via a new unspecifiedRulesAction property, enabling “ignore/disable/remove” handling for firewall rules not included in the declared rules array (related to issue #1579’s drift-management needs).
Changes:
- Adds
unspecifiedRulesActionto the resource schema and Rust input model (Ignore|Disable|Remove). - Implements set-time handling to disable or remove rules that are not explicitly listed.
- Adds Pester coverage for the new behavior using
--what-if, plus new localized what-if messages.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/windows_firewall/windows_firewall.dsc.resource.json | Adds the unspecifiedRulesAction schema property for the resource input contract. |
| resources/windows_firewall/tests/windows_firewall_set.tests.ps1 | Adds what-if tests validating ignore/disable/remove behavior for unspecified rules. |
| resources/windows_firewall/src/types.rs | Introduces UnspecifiedRulesAction and wires it into FirewallRuleList. |
| resources/windows_firewall/src/firewall.rs | Implements disable/remove behavior for rules not listed in input. |
| resources/windows_firewall/locales/en-us.toml | Adds localized what-if strings for disabling/removing unspecified rules. |
| resources/windows_firewall/Cargo.toml | Bumps the crate version to 0.2.0. |
| Cargo.lock | Updates the workspace lockfile for the version bump. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Added new
unspecifiedRulesActionproperty with values:enabledset tofalse)The tests use
--what-ifto validate since i don't want to actually affect the system under test. Manually tested in a VM.PR Context
Fix #1579